package com.zhuiyun.project.api.ancientPoetry.mapper;

import com.zhuiyun.project.api.ancientPoetry.entity.AncientPoetry;
import com.zhuiyun.project.api.ancientPoetry.entity.Poetry;
import com.zhuiyun.project.api.poetryAuthor.entity.PoetryAuthor;
import com.zhuiyun.project.common.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AncientPoetryMapper extends BaseMapper<AncientPoetry> {
   /**
    *
    * @Author shy
    * @Date 2023/12/14 10:51 本地添加诗词
     * @param poetry

    */
    @Insert("<script>insert into ancient_poetry(title,author,content) values (#{poetry.title},#{poetry.author},#{poetry.content})</script>")
    void insertReadPoetry(@Param("poetry") Poetry poetry);

    /**
     *
     * @Author shy
     * @Date 2023/12/14 10:51 TODO 分页查询诗词  xml
      * @param poetryAuthor
     * @return List<AncientPoetry>
     */

    List<AncientPoetry> selectPoetry(AncientPoetry poetryAuthor);
}
